<!--  -->
<template>
  <div class="box">子组件
   {{ pros.modelValue }}

   <button @click="update">修改</button>
  </div>
</template>

<script lang='ts' setup>
import { reactive,toRefs,ref,defineProps,defineEmits} from 'vue'
const emit=defineEmits(['update:modelValue'])
const pros=defineProps({

     modelValue:{
        type:String
     }
})
const update=()=>{
   emit('update:modelValue',"修改后的值")
}

</script>
<style scoped>
.box{
    width: 100%;
    height: 300px;
    background: skyblue;
}
</style>